package com.markerhub.modules.admin;

import cn.hutool.core.map.MapUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.markerhub.common.lang.Result;
import com.markerhub.entity.AppBlueLabel;
import com.markerhub.modules.common.BaseController;
import com.markerhub.service.AppBlueLabelService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/admin")
public class AdminLableController extends BaseController {

    @Resource
    AppBlueLabelService appBlueLabelService;


    @GetMapping("/lables/list")
    public Result list(AppBlueLabel appOrder) {
        Object pageAdmin = appBlueLabelService.pageAdmin(getPage(), appOrder);
        Page<AppBlueLabel> data= (Page<AppBlueLabel>) pageAdmin;
        return Result.success(MapUtil.builder()
                .put("pageData", data)
                .build()
        );
    }









}



